<?php $this->load->view('header') ?>

  <!-- CONTENT -->
<div id="content">
<div class="column full">
		
		<div class="box">
		<div class="box-header"><?php echo get_title();?></div>
		<div class="box-content">

      <?php echo anchor('myuser/group/view', $this->lang->line ( 'myuser_group_view' ), 'class="button white"'); ?>
       <br /><br />

        <?php if (isset($errorMessage)) : ?>
            <div class="notification <?php echo ((isset($isSuccess) && $isSuccess) ? 'success' : 'error');?>"><?php echo $errorMessage; ?></div>
        <?php endif; ?>


			<div class="width10 fl">
				<label class="form-label">ID</label>
			</div>
			
			<div class="width90 fr">
				: <?php echo $groupDetail['groupId'];?>
			</div>
			<p>&nbsp;</p> 
			<div class="clear"></div>
			<!-- New line -->
			
			<div class="width10 fl">
				<label class="form-label"><?php echo $this->lang->line('myuser_group_title');?></label>
			</div>
			
			<div class="width90 fr">
                : <?php echo $groupDetail['groupName'];?>
			</div>
			<p>&nbsp;</p> 
			<div class="clear"></div>
			<!-- New line -->
			
			<div class="width10 fl">
				<label class="form-label"><?php echo $this->lang->line('myuser_group_desc');?></label>
			</div>
			
			<div class="width90 fr">
                : <?php echo $groupDetail['groupDesc'];?>
			</div>
			<p>&nbsp;</p> 
			<div class="clear"></div>
			<!-- New line -->
			
			<!-- Hak Akses -->
            <?php if (isAccess('myuser','group','access')) : ?>
            <?php echo form_open('myuser/group/detail/id/'.$groupDetail['groupId'].'/time/' . time(),array('name'=>'userDetailAccessLocation','id'=>'userDetailAccessLocation','method'=>'post','class'=>'frModalLoad')); ?>
            <?php echo form_hidden('kirim','groupDetailAccess');?>

            <?php $module = array();?>
			<?php $module = $this->myindo_user->getListAccess();?>
			
			<!-- Module -->
            <?php if($module):?>
            <div class="width10 fl">
                <label class="form-label">Hak Akses</label>
            </div>
            
            <div class="width90 fr" id="menu">
            
            	<ul id="tree">
                <?php foreach($module as $row) : ?>
                    
                    <!-- Controller -->
                	<?php $controller = $this->myindo_user->getListAccess($row['accessId']); ?>
                    <?php if (!$controller) : ?>
                        <li><b><?php echo $row['accessDesc']?></b><br />
                        <?php $checked = in_array($row['accessId'],$listGroupAccess) ? true : false;?>
                        &nbsp;&nbsp;<?php echo form_checkbox(array('name'=>'access[]','id'=>'access_' . $row['accessId'],'value'=>$row['accessId'],'checked' => $checked))?>
                        <?php echo $row['accessDesc']?>
                        </li>
                    <?php endif;?>
                    <!-- End Controller -->
                        
                <?php endforeach;?>
                <ul>
            </div>
            
            <p>&nbsp;</p> 
            <div class="clear"></div>
            <div class="width10 fl"></div>
            <div class="width90 fr">
                <br />
                &nbsp;&nbsp;<?php echo form_submit('submitAccess','Update Hak Access','class="button themed"');?>
            </div>          
            
            <!-- New line -->
            <div class="clear"></div>
            </form>
                
            <?php endif?>
			<!-- End Module -->
			
            <?php endif;?>
            <!-- End Hak Akses -->

            <div class="clear"></div>
		</div>
		</div>
	
	</div>
	</div>
		</div>

<link href="<?php echo base_url() ?>themes/web/rikkesv2/css/jquery.treeview.css" type="text/css" rel="stylesheet" />
<script src="<?php echo base_url();?>js/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="<?php echo base_url();?>js/libs/jquery/mod/web/jquery.treeview.js" type="text/javascript"></script>

<script type="text/javascript">
<!--
jQuery(document).ready(function($){
    $("#tree").treeview({
		collapsed: true,
		animated: "fast",
		control:"#sidetreecontrol",
		persist: "location"
	});
});
//-->
</script>
<?php $this->load->view('footer') ?>